#include <iostream>
#define N 1000


using namespace std;


int main(){

char array[N];
int i;
int n;
int j;
int aux;

cout<<"Type the number of elements you want in the array "<<endl;
cin>>n;
cout<<"Type the elements"<<endl;

for(i=0; i<n; i++){
	cin>>array[i];}

cout<<"The original array is ";

for(i=0; i<n; i++){
	cout<<array[i]<<" ";}
cout<<endl;

for(i=0, j=n-1; i<j; j--,i++ ){
	aux=array[i];
	array[i]=array[j];
	array[j]=aux;
}


cout<<"The swapped array is ";

for(i=0; i<n; i++){
	cout<<array[i]<<" ";}
cout<<endl;

return 0;

}
